package com.wanxi.date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Tool {
    private Tool() {

    }

    public static int getYear(Date date) {
//        date.getYear();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");
        String format = simpleDateFormat.format(date);
        return Integer.parseInt(format);
//        return date.getYear();
//        return date.getMonth();
    }
}
